home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / appkit / Box.h < prev    next >
Text File  |  1992-09-11  |  2KB  |  83 lines

  1. /*
  2.     Box.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "View.h"
  8.  
  9. /* Box types */
  10.  
  11. #define NX_NOBORDER    0
  12. #define NX_LINE        1
  13. #define NX_BEZEL    2
  14. #define NX_GROOVE    3
  15. #define NX_RIDGE    3    /* historical - use NX_GROOVE */
  16.  
  17. /* Box title positions */
  18.  
  19. #define NX_NOTITLE    0
  20. #define NX_ABOVETOP    1
  21. #define NX_ATTOP    2
  22. #define NX_BELOWTOP    3
  23. #define NX_ABOVEBOTTOM    4
  24. #define NX_ATBOTTOM    5
  25. #define NX_BELOWBOTTOM    6
  26.  
  27. @interface Box : View
  28. {
  29.     id                  cell;
  30.     id                  contentView;
  31.     NXSize              offsets;
  32.     NXRect              borderRect;
  33.     NXRect              titleRect;
  34.     struct _bFlags {
  35. #ifdef __BIG_ENDIAN__
  36.     unsigned int        borderType:2;
  37.     unsigned int        titlePosition:3;
  38.     unsigned int        _transparent:1;
  39.     unsigned int        _RESERVED:10;
  40. #else
  41.     unsigned int        _RESERVED:10;
  42.     unsigned int        _transparent:1;
  43.     unsigned int        titlePosition:3;
  44.     unsigned int        borderType:2;
  45. #endif
  46.     }                   bFlags;
  47. }
  48.  
  49. - initFrame:(const NXRect *)frameRect;
  50.  
  51. - awake;
  52. - free;
  53. - (int)borderType;
  54. - (int)titlePosition;
  55. - setBorderType:(int)aType;
  56. - setTitlePosition:(int)aPosition;
  57. - (const char *)title;
  58. - setTitle:(const char *)aString;
  59. - cell;
  60. - font;
  61. - setFont:fontObj;
  62. - getOffsets:(NXSize *)aSize;
  63. - setOffsets:(NXCoord)width :(NXCoord)height;
  64. - sizeTo:(NXCoord)width :(NXCoord)height;
  65. - sizeToFit;
  66. - setFrameFromContentFrame:(const NXRect *)contentFrame;
  67. - contentView;
  68. - setContentView:aView;
  69. - addSubview:aView;
  70. - replaceSubview:oldView with:newView;
  71. - drawSelf:(const NXRect *)rects :(int)rectCount;
  72. - write:(NXTypedStream *)stream;
  73. - read:(NXTypedStream *)stream;
  74.  
  75. /* 
  76.  * The following new... methods are now obsolete.  They remain in this  
  77.  * interface file for backward compatibility only.  Use Object's alloc method  
  78.  * and the init... methods defined in this class instead.
  79.  */
  80. + newFrame:(const NXRect *)frameRect;
  81.  
  82. @end
  83.